home *** CD-ROM | disk | FTP | other *** search
-
-
-
- QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt))))
-
-
-
- NNNNAAAAMMMMEEEE
- QButton - The abstract base class of button widgets,
- providing functionality common to buttons
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- #include <qbutton.h>
-
- Inherits QWidget.
-
- Inherited by QCheckBox, QPushButton, QRadioButton and
- QToolButton.
-
- PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrrssss
- QQQQBBBBuuuuttttttttoooonnnn (((( QQQQWWWWiiiiddddggggeeeetttt **** _p_a_r_e_n_t====0000,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr **** _n_a_m_e====0000 ))))
- ~~~~QQQQBBBBuuuuttttttttoooonnnn ()
- ccccoooonnnnsssstttt cccchhhhaaaarrrr**** tttteeeexxxxtttt (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttTTTTeeeexxxxtttt (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** ))))
- ccccoooonnnnsssstttt QQQQPPPPiiiixxxxmmmmaaaapppp**** ppppiiiixxxxmmmmaaaapppp (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttPPPPiiiixxxxmmmmaaaapppp (((( ccccoooonnnnsssstttt QQQQPPPPiiiixxxxmmmmaaaapppp &&&& ))))
- iiiinnnntttt aaaacccccccceeeellll (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttAAAAcccccccceeeellll (((( iiiinnnntttt ))))
- bbbboooooooollll iiiissssTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttDDDDoooowwwwnnnn (((( bbbboooooooollll ))))
- bbbboooooooollll iiiissssDDDDoooowwwwnnnn (((()))) ccccoooonnnnsssstttt
- bbbboooooooollll iiiissssOOOOnnnn (((()))) ccccoooonnnnsssstttt
- bbbboooooooollll aaaauuuuttttooooRRRReeeessssiiiizzzzeeee (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttAAAAuuuuttttooooRRRReeeessssiiiizzzzeeee (((( bbbboooooooollll ))))
- bbbboooooooollll aaaauuuuttttooooRRRReeeeppppeeeeaaaatttt (((()))) ccccoooonnnnsssstttt
- vvvvooooiiiidddd sssseeeettttAAAAuuuuttttooooRRRReeeeppppeeeeaaaatttt (((( bbbboooooooollll ))))
-
- PPPPuuuubbbblllliiiicccc SSSSlllloooottttssss
- vvvvooooiiiidddd aaaannnniiiimmmmaaaatttteeeeCCCClllliiiicccckkkk (((())))
- vvvvooooiiiidddd ttttoooogggggggglllleeee (((())))
-
- SSSSiiiiggggnnnnaaaallllssss
- vvvvooooiiiidddd pppprrrreeeesssssssseeeedddd (((())))
- vvvvooooiiiidddd rrrreeeelllleeeeaaaasssseeeedddd (((())))
- vvvvooooiiiidddd cccclllliiiicccckkkkeeeedddd (((())))
- vvvvooooiiiidddd ttttoooogggggggglllleeeedddd (((( bbbboooooooollll ))))
-
- PPPPrrrrooootttteeeecccctttteeeedddd MMMMeeeemmmmbbbbeeeerrrrssss
- vvvvooooiiiidddd sssseeeettttTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn (((( bbbboooooooollll ))))
- vvvvooooiiiidddd sssseeeettttOOOOnnnn (((( bbbboooooooollll ))))
- vvvviiiirrrrttttuuuuaaaallll bbbboooooooollll hhhhiiiittttBBBBuuuuttttttttoooonnnn (((( ccccoooonnnnsssstttt QQQQPPPPooooiiiinnnntttt &&&& ppppoooossss )))) ccccoooonnnnsssstttt
- vvvviiiirrrrttttuuuuaaaallll vvvvooooiiiidddd ddddrrrraaaawwwwBBBBuuuuttttttttoooonnnn (((( QQQQPPPPaaaaiiiinnnntttteeeerrrr **** ))))
- vvvviiiirrrrttttuuuuaaaallll vvvvooooiiiidddd ddddrrrraaaawwwwBBBBuuuuttttttttoooonnnnLLLLaaaabbbbeeeellll (((( QQQQPPPPaaaaiiiinnnntttteeeerrrr **** ))))
- vvvviiiirrrrttttuuuuaaaallll vvvvooooiiiidddd kkkkeeeeyyyyPPPPrrrreeeessssssssEEEEvvvveeeennnntttt (((( QQQQKKKKeeeeyyyyEEEEvvvveeeennnntttt **** ))))
- vvvviiiirrrrttttuuuuaaaallll vvvvooooiiiidddd mmmmoooouuuusssseeeePPPPrrrreeeessssssssEEEEvvvveeeennnntttt (((( QQQQMMMMoooouuuusssseeeeEEEEvvvveeeennnntttt **** ))))
- vvvviiiirrrrttttuuuuaaaallll vvvvooooiiiidddd mmmmoooouuuusssseeeeRRRReeeelllleeeeaaaasssseeeeEEEEvvvveeeennnntttt (((( QQQQMMMMoooouuuusssseeeeEEEEvvvveeeennnntttt **** ))))
- vvvviiiirrrrttttuuuuaaaallll vvvvooooiiiidddd mmmmoooouuuusssseeeeMMMMoooovvvveeeeEEEEvvvveeeennnntttt (((( QQQQMMMMoooouuuusssseeeeEEEEvvvveeeennnntttt **** ))))
- vvvviiiirrrrttttuuuuaaaallll vvvvooooiiiidddd ppppaaaaiiiinnnnttttEEEEvvvveeeennnntttt (((( QQQQPPPPaaaaiiiinnnnttttEEEEvvvveeeennnntttt **** ))))
- vvvviiiirrrrttttuuuuaaaallll vvvvooooiiiidddd ffffooooccccuuuussssIIIInnnnEEEEvvvveeeennnntttt (((( QQQQFFFFooooccccuuuussssEEEEvvvveeeennnntttt **** ))))
-
-
-
- Page 1 (printed 9/22/98)
-
-
-
-
-
-
- QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt))))
-
-
-
- vvvviiiirrrrttttuuuuaaaallll vvvvooooiiiidddd ffffooooccccuuuussssOOOOuuuuttttEEEEvvvveeeennnntttt (((( QQQQFFFFooooccccuuuussssEEEEvvvveeeennnntttt **** ))))
- vvvviiiirrrrttttuuuuaaaallll vvvvooooiiiidddd eeeennnnaaaabbbblllleeeeddddCCCChhhhaaaannnnggggeeee (((( bbbboooooooollll ))))
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The QButton class is the abstract base class of button
- widgets, providing functionality common to buttons.
-
- The QButton class implements an abstract button, and lets
- subclasses specify how to reply to user actions and how to
- draw the button.
-
- QButton provides both push and toggle buttons. The
- QRadioButton and QCheckBox classes provide only toggle
- buttons, QPushButton and QToolButton provide both toggle and
- push buttons.
-
- Any button can have either a text or pixmap label. setText()
- sets the button to be a text button and setPixmap() sets it
- to be a pixmap button. The text/pixmap is manipulated as
- necessary to create "disabled" appearance when the button is
- disabled.
-
- QButton provides most of the states used for buttons:
-
- isDown() determines whether the button is _p_r_e_s_s_e_d down.
-
- can be switched on and off (see below).
- isOn() determines whether the button is _o_n. Only toggle buttons
-
- user.
- isEnabled() determines whether the button can be pressed by the
-
- the user holds it down.
- setAutoRepeat() determines whether the button will auto-
- repeat if
-
- button or not.
- setToggleButton() determines whether the button is a toggle
-
- The difference between isDown() and isOn() is as follows:
- When the user clicks a toggle button to toggle it on, the
- button is first _p_r_e_s_s_e_d, then released into _o_n state. When
- the user clicks it again (to toggle it off) the button moves
- first to the _p_r_e_s_s_e_d state, then to the _o_f_f state (isOn()
- and isDown() are both FALSE).
-
- Default buttons (as used in many dialogs) are provided by
- QPushButton::setDefault() and QPushButton::setAutoDefault().
-
- QButton provides four signals:
-
- the mouse cursor is inside the button.
-
-
-
- Page 2 (printed 9/22/98)
-
-
-
-
-
-
- QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt))))
-
-
-
- pressed() is emitted when the left mouse button is pressed while
-
- released() is emitted when the left mouse button is released.
-
- released, or when the accelerator key is typed, or when
- animateClick() is called.
- clicked() is emitted when the button is first pressed then
-
- toggled() is emitted when the state of a toggle button changes.
-
- If the button is a text button with "&" in its text, QButton
- creates an automatic accelerator key. This code creates a
- push button labelled "Rock & Roll" (where the c is
- underscored). The button gets an automatic accelerator key,
- Alt-C:
-
- QPushButton *p = new QPushButton( "Ro&ck && Roll", this );
-
- In this example, when the user presses Alt-C the button will
- animate a click.
-
- You can also set a custom accelerator using the setAccel()
- function. This is useful mostly for pixmap buttons since
- they have no automatic accelerator.
-
- QPushButton *p;
- p->setPixmap( QPixmap("print.gif") );
- p->setAccel( ALT+Key_F7 );
-
- All of the buttons provided by Qt (QPushButton, QToolButton,
- QCheckBox and QRadioButton) can display both text and
- pixmaps.
-
- To subclass QButton, you have to reimplement at least
- drawButton() (to draw the button's outskirts) and
- drawButtonLabel() (to draw its text or pixmap). It is
- generally advisable to reimplement sizeHint() as well, and
- sometimes hitButton() (to determine whether a button press
- is within the button).
-
- To reduce flickering the QButton::paintEvent() sets up a
- pixmap that the drawButton() function draws in. You should
- not reimplement paintEvent() for a subclass of QButton
- unless you want to take over all drawing.
-
- See also: QButtonGroup and Microsoft Style Guide
-
- Examples: tictac/tictac.cpp
-
- MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDOOOOCCCCUUUUMMMMEEEENNNNTTTTAAAATTTTIIIIOOOONNNN
- QQQQBBBBuuuuttttttttoooonnnn::::::::QQQQBBBBuuuuttttttttoooonnnn (((( QQQQWWWWiiiiddddggggeeeetttt **** ppppaaaarrrreeeennnntttt====0000,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr **** nnnnaaaammmmeeee====0000 ))))
- Constructs a standard button with a parent widget and a
-
-
-
- Page 3 (printed 9/22/98)
-
-
-
-
-
-
- QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt))))
-
-
-
- name.
-
- If _p_a_r_e_n_t is a QButtonGroup, this constructor calls
- QButtonGroup::insert().
-
- QQQQBBBBuuuuttttttttoooonnnn::::::::~~~~QQQQBBBBuuuuttttttttoooonnnn (((())))
- Destroys the button and all its child widgets.
-
- iiiinnnntttt QQQQBBBBuuuuttttttttoooonnnn::::::::aaaacccccccceeeellll (((()))) ccccoooonnnnsssstttt
- Returns the accelerator key currently set for the button, or
- 0 if no accelerator key has been set.
-
- See also: setAccel().
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::aaaannnniiiimmmmaaaatttteeeeCCCClllliiiicccckkkk (((()))) [[[[ssssllllooootttt]]]]
- Performs an animated click: The button is pressed and a
- short while later released.
-
- pressed(), released(), clicked() and toggled() signals are
- emitted as appropriate.
-
- This function does nothing if the button is disabled.
-
- See also: setAccel().
-
- bbbboooooooollll QQQQBBBBuuuuttttttttoooonnnn::::::::aaaauuuuttttooooRRRReeeeppppeeeeaaaatttt (((()))) ccccoooonnnnsssstttt
- Returns TRUE if the button is auto-repeating, else FALSE.
-
- The default is FALSE.
-
- See also: setAutoRepeat().
-
- bbbboooooooollll QQQQBBBBuuuuttttttttoooonnnn::::::::aaaauuuuttttooooRRRReeeessssiiiizzzzeeee (((()))) ccccoooonnnnsssstttt
- Returns TRUE if auto-resizing is enabled, or FALSE if auto-
- resizing is disabled.
-
- Auto-resizing is disabled by default.
-
- See also: setAutoResize().
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::cccclllliiiicccckkkkeeeedddd (((()))) [[[[ssssiiiiggggnnnnaaaallll]]]]
- This signal is emitted when the button is activated (i.e.
- first pressed down and then released when the mouse cursor
- is inside the button).
-
- See also: pressed(), released() and toggled().
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::ddddrrrraaaawwwwBBBBuuuuttttttttoooonnnn (((( QQQQPPPPaaaaiiiinnnntttteeeerrrr **** )))) [[[[vvvviiiirrrrttttuuuuaaaallll pppprrrrooootttteeeecccctttteeeedddd]]]]
- Draws the button. The default implementation does nothing.
-
- This virtual function is reimplemented by subclasses to draw
- real buttons.
-
-
-
- Page 4 (printed 9/22/98)
-
-
-
-
-
-
- QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt))))
-
-
-
- Reimplemented in QToolButton, QPushButton, QCheckBox and
- QRadioButton.
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::ddddrrrraaaawwwwBBBBuuuuttttttttoooonnnnLLLLaaaabbbbeeeellll (((( QQQQPPPPaaaaiiiinnnntttteeeerrrr **** )))) [[[[vvvviiiirrrrttttuuuuaaaallll pppprrrrooootttteeeecccctttteeeedddd]]]]
- Draws the button text or pixmap. The default implementation
- does nothing.
-
- This virtual function is reimplemented by subclasses to draw
- real buttons.
-
- Reimplemented in QToolButton, QPushButton, QCheckBox and
- QRadioButton.
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::eeeennnnaaaabbbblllleeeeddddCCCChhhhaaaannnnggggeeee (((( bbbboooooooollll eeee )))) [[[[vvvviiiirrrrttttuuuuaaaallll pppprrrrooootttteeeecccctttteeeedddd]]]]
- Reimplemented for internal reasons; the API is not affected.
-
- Reimplemented from QWidget.
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::ffffooooccccuuuussssIIIInnnnEEEEvvvveeeennnntttt (((( QQQQFFFFooooccccuuuussssEEEEvvvveeeennnntttt **** )))) [[[[vvvviiiirrrrttttuuuuaaaallll pppprrrrooootttteeeecccctttteeeedddd]]]]
- Handles focus in events for the button.
-
- See also: focusOutEvent().
-
- Reimplemented from QWidget.
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::ffffooooccccuuuussssOOOOuuuuttttEEEEvvvveeeennnntttt (((( QQQQFFFFooooccccuuuussssEEEEvvvveeeennnntttt **** )))) [[[[vvvviiiirrrrttttuuuuaaaallll pppprrrrooootttteeeecccctttteeeedddd]]]]
- Handles focus out events for the button.
-
- See also: focusInEvent().
-
- Reimplemented from QWidget.
-
- bbbboooooooollll QQQQBBBBuuuuttttttttoooonnnn::::::::hhhhiiiittttBBBBuuuuttttttttoooonnnn (((( ccccoooonnnnsssstttt QQQQPPPPooooiiiinnnntttt &&&& ppppoooossss )))) ccccoooonnnnsssstttt [[[[vvvviiiirrrrttttuuuuaaaallll
- pppprrrrooootttteeeecccctttteeeedddd]]]]
- Returns TRUE if _p_o_s is inside the widget rectangle, or FALSE
- if it is outside.
-
- This virtual function is reimplemented by subclasses.
-
- Reimplemented in QRadioButton.
-
- bbbboooooooollll QQQQBBBBuuuuttttttttoooonnnn::::::::iiiissssDDDDoooowwwwnnnn (((()))) ccccoooonnnnsssstttt
- Returns TRUE if the button pressed down, or FALSE if it is
- standing up.
-
- See also: setDown().
-
- Examples: tictac/tictac.cpp
-
- bbbboooooooollll QQQQBBBBuuuuttttttttoooonnnn::::::::iiiissssOOOOnnnn (((()))) ccccoooonnnnsssstttt
- Returns TRUE if this toggle button is switched on, or FALSE
- if it is switched off.
-
-
-
- Page 5 (printed 9/22/98)
-
-
-
-
-
-
- QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt))))
-
-
-
- See also: setOn() and toggleButton().
-
- Examples: qmag/qmag.cpp
-
- bbbboooooooollll QQQQBBBBuuuuttttttttoooonnnn::::::::iiiissssTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn (((()))) ccccoooonnnnsssstttt
- Returns TRUE if the button is a toggle button.
-
- See also: setToggleButton().
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::kkkkeeeeyyyyPPPPrrrreeeessssssssEEEEvvvveeeennnntttt (((( QQQQKKKKeeeeyyyyEEEEvvvveeeennnntttt **** eeee )))) [[[[vvvviiiirrrrttttuuuuaaaallll pppprrrrooootttteeeecccctttteeeedddd]]]]
- Handles keyboard events for the button.
-
- Space is the only key that has any effect; it calls
- animateClick().
-
- Reimplemented from QWidget.
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::mmmmoooouuuusssseeeeMMMMoooovvvveeeeEEEEvvvveeeennnntttt (((( QQQQMMMMoooouuuusssseeeeEEEEvvvveeeennnntttt **** eeee )))) [[[[vvvviiiirrrrttttuuuuaaaallll
- pppprrrrooootttteeeecccctttteeeedddd]]]]
- Handles mouse move events for the button.
-
- See also: mousePressEvent() and mouseReleaseEvent().
-
- Reimplemented from QWidget.
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::mmmmoooouuuusssseeeePPPPrrrreeeessssssssEEEEvvvveeeennnntttt (((( QQQQMMMMoooouuuusssseeeeEEEEvvvveeeennnntttt **** eeee )))) [[[[vvvviiiirrrrttttuuuuaaaallll
- pppprrrrooootttteeeecccctttteeeedddd]]]]
- Handles mouse press events for the button.
-
- See also: mouseReleaseEvent().
-
- Reimplemented from QWidget.
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::mmmmoooouuuusssseeeeRRRReeeelllleeeeaaaasssseeeeEEEEvvvveeeennnntttt (((( QQQQMMMMoooouuuusssseeeeEEEEvvvveeeennnntttt **** eeee )))) [[[[vvvviiiirrrrttttuuuuaaaallll
- pppprrrrooootttteeeecccctttteeeedddd]]]]
- Handles mouse release events for the button.
-
- See also: mousePressEvent().
-
- Reimplemented from QWidget.
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::ppppaaaaiiiinnnnttttEEEEvvvveeeennnntttt (((( QQQQPPPPaaaaiiiinnnnttttEEEEvvvveeeennnntttt **** eeeevvvveeeennnntttt )))) [[[[vvvviiiirrrrttttuuuuaaaallll
- pppprrrrooootttteeeecccctttteeeedddd]]]]
- Handles paint events for the button.
-
- Opens the painter on the button and calls drawButton().
-
- Reimplemented from QWidget.
-
- ccccoooonnnnsssstttt QQQQPPPPiiiixxxxmmmmaaaapppp **** QQQQBBBBuuuuttttttttoooonnnn::::::::ppppiiiixxxxmmmmaaaapppp (((()))) ccccoooonnnnsssstttt
- Returns the button pixmap, or 0 if the button has no pixmap.
-
-
-
-
- Page 6 (printed 9/22/98)
-
-
-
-
-
-
- QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt))))
-
-
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::pppprrrreeeesssssssseeeedddd (((()))) [[[[ssssiiiiggggnnnnaaaallll]]]]
- This signal is emitted when the button is pressed down.
-
- See also: released() and clicked().
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::rrrreeeelllleeeeaaaasssseeeedddd (((()))) [[[[ssssiiiiggggnnnnaaaallll]]]]
- This signal is emitted when the button is released.
-
- See also: pressed(), clicked() and toggled().
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::sssseeeettttAAAAcccccccceeeellll (((( iiiinnnntttt kkkkeeeeyyyy ))))
- Specifies an accelerator _k_e_y for the button, or removes the
- accelerator if _k_e_y is 0.
-
- Setting a button text containing a shortcut character (for
- example the 'x' in E&xit) automatically defines an
- ALT+letter accelerator for the button. You only need to call
- this function in order to specify a custom accelerator.
-
- Example:
-
- QPushButton *b1 = new QPushButton;
- b1->setText( "&OK" ); // sets accel ALT+'O'
- QPushButton *b2 = new QPushButton;
- b2->setPixmap( printIcon ); // pixmap instead of text
- b2->setAccel( CTRL+'P' ); // custom accel
-
- See also: accel(), setText() and QAccel.
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::sssseeeettttAAAAuuuuttttooooRRRReeeeppppeeeeaaaatttt (((( bbbboooooooollll eeeennnnaaaabbbblllleeee ))))
- Turns on auto-repeat for the button if _e_n_a_b_l_e is TRUE, or
- turns it off if _e_n_a_b_l_e is FALSE.
-
- When auto-repeat is enabled, the clicked() signal is emitted
- at regular intervals while the buttons is down.
-
- setAutoRepeat() has no effect for toggle buttons.
-
- See also: isDown(), autoRepeat() and clicked().
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::sssseeeettttAAAAuuuuttttooooRRRReeeessssiiiizzzzeeee (((( bbbboooooooollll eeeennnnaaaabbbblllleeee ))))
- Enables auto-resizing if _e_n_a_b_l_e is TRUE, or disables it if
- _e_n_a_b_l_e is FALSE.
-
- When auto-resizing is enabled, the button will resize itself
- whenever the contents change.
-
- See also: autoResize() and adjustSize().
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::sssseeeettttDDDDoooowwwwnnnn (((( bbbboooooooollll eeeennnnaaaabbbblllleeee ))))
- Sets the state of the button to pressed down if _e_n_a_b_l_e is
- TRUE or to standing up if _e_n_a_b_l_e is FALSE.
-
-
-
- Page 7 (printed 9/22/98)
-
-
-
-
-
-
- QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt))))
-
-
-
- If the button is a toggle button, it is _n_o_t toggled. Call
- toggle() as well if you need to do that. The pressed() and
- released() signals are not emitted by this function.
-
- This method is provided in case you need to override the
- mouse event handlers.
-
- See also: isDown(), setOn(), toggle() and toggled().
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::sssseeeettttOOOOnnnn (((( bbbboooooooollll eeeennnnaaaabbbblllleeee )))) [[[[pppprrrrooootttteeeecccctttteeeedddd]]]]
- Switches a toggle button on if _e_n_a_b_l_e is TRUE or off if
- _e_n_a_b_l_e is FALSE. This function should be called only for
- toggle buttons.
-
- See also: isOn() and toggleButton().
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::sssseeeettttPPPPiiiixxxxmmmmaaaapppp (((( ccccoooonnnnsssstttt QQQQPPPPiiiixxxxmmmmaaaapppp &&&& ppppiiiixxxxmmmmaaaapppp ))))
- Sets the button to display _p_i_x_m_a_p and repaints at once.
-
- If _p_i_x_m_a_p is monochrome (i.e. it is a QBitmap or its depth
- is 1) and it does not have a mask, this function sets the
- pixmap to be its own mask. The purpose of this is to draw
- transparent bitmaps, which is important for e.g. toggle
- buttons.
-
- The button resizes itself if auto-resizing is enabled,
- changes its minimum size if autoMinimumSize() is enabled,
- and always disables any accelerator.
-
- See also: pixmap(), setText(), setAutoMinimumSize(),
- setAutoResize(), setAccel() and QPixmap::mask().
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::sssseeeettttTTTTeeeexxxxtttt (((( ccccoooonnnnsssstttt cccchhhhaaaarrrr **** tttteeeexxxxtttt ))))
- Sets the button to display _t_e_x_t and repaints
-
- The button resizes itself if auto-resizing is enabled,
- changes its minimum size if autoMinimumSize() is enabled,
- and sets the appropriate accelerator.
-
- See also: text(), setPixmap(), setAutoMinimumSize(),
- setAutoResize(), setAccel() and QPixmap::mask().
-
- Examples: xform/xform.cpp layout/layout.cpp qmag/qmag.cpp
- widgets/widgets.cpp
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::sssseeeettttTTTToooogggggggglllleeeeBBBBuuuuttttttttoooonnnn (((( bbbboooooooollll eeeennnnaaaabbbblllleeee )))) [[[[pppprrrrooootttteeeecccctttteeeedddd]]]]
- Makes the button a toggle button if _e_n_a_b_l_e is TRUE, or a
- normal button if _e_n_a_b_l_e is FALSE.
-
- Note that this function is protected. It is called from
- subclasses to enable the toggle functionality. QCheckBox and
- QRadioButton are toggle buttons. QPushButton is initially
-
-
-
- Page 8 (printed 9/22/98)
-
-
-
-
-
-
- QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt)))) TTTTrrrroooollllllll TTTTeeeecccchhhh AAAASSSS ((((9999 JJJJuuuullllyyyy 1111999999998888)))) QQQQBBBBuuuuttttttttoooonnnn((((3333qqqqtttt))))
-
-
-
- not a toggle button, but QPushButton::setToggleButton() can
- be called to create toggle buttons.
-
- See also: isToggleButton().
-
- ccccoooonnnnsssstttt cccchhhhaaaarrrr **** QQQQBBBBuuuuttttttttoooonnnn::::::::tttteeeexxxxtttt (((()))) ccccoooonnnnsssstttt
- Returns the button text, or 0 if the button has no text.
-
- See also: setText().
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::ttttoooogggggggglllleeee (((()))) [[[[ssssllllooootttt]]]]
- if this is a toggle button, toggles it.
-
- vvvvooooiiiidddd QQQQBBBBuuuuttttttttoooonnnn::::::::ttttoooogggggggglllleeeedddd (((( bbbboooooooollll oooonnnn )))) [[[[ssssiiiiggggnnnnaaaallll]]]]
- This signal is emitted whenever a toggle button changes
- status. _o_n is TRUE if the button is on, or FALSE if the
- button is off.
-
- This may be the result of a user action, toggle() slot
- activation, or because setOn() was called.
-
- See also: clicked().
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- hhhhttttttttpppp::::////////wwwwwwwwwwww....ttttrrrroooollllllll....nnnnoooo////qqqqtttt////qqqqbbbbuuuuttttttttoooonnnn....hhhhttttmmmmllll
-
- CCCCOOOOPPPPYYYYRRRRIIIIGGGGHHHHTTTT
- Copyright 1992-1997 Troll Tech AS. See the LICENSE file
- included in the distribution for a complete license
- statement.
-
- AAAAUUUUTTTTHHHHOOOORRRR
- Generated automatically from the source code.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Page 9 (printed 9/22/98)
-
-
-
-